<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>权限--layui后台管理模板</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="../../../public/layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="../../../public/css/public.css" media="all" />
	<style>
		.layui-textarea{padding: 10px;}
		.layui-colla-item{position: relative;}
		.layui-colla-item > .layui-form-checkbox[lay-skin=primary]{margin-top: 0; position: absolute; top: 10px; left: 60px; height: 20px !important;z-index: 999;}
		.layui-colla-item.on > .layui-form-checkbox[lay-skin=primary] i:before{position: absolute; top: 4px; left: 4px;
			content: ''; display: block; width: 8px; height: 8px; background: #5fb878;}
		.layui-colla-item.on > .layui-form-checked[lay-skin=primary] i{background: #fff;}
		.layui-colla-title{ height: 38px; line-height: 38px; padding: 0 10px 0 35px; }

		.layui-colla-content{padding-left: 80px;}
		.layui-colla-content .layui-form-label{text-align: left; padding: 0; width: 180px;}
		.layui-colla-content .layui-form-label .layui-form-checkbox[lay-skin=primary] span{color: #009688;}
		.layui-colla-content .layui-form-item.on .layui-form-label .layui-form-checkbox[lay-skin=primary] i:before{position: absolute; top: 4px; left: 4px;
			content: ''; display: block; width: 8px; height: 8px; background: #5fb878;}
		.layui-colla-content .layui-form-item.on .layui-form-label .layui-form-checked[lay-skin=primary] i{background: #fff;}
		.layui-colla-content .layui-input-block{margin-left: 220px;}
		.layui-colla-content .layui-input-block .layui-form-checkbox[lay-skin=primary]{margin-top: 0; margin-right: 10px;}

		.layui-colla-content .layui-form-item{margin-bottom: 0; padding-bottom: 10px; padding-top: 0;}
		.layui-colla-content .layui-form-item:first-child{ padding-top: 5px;}

		.layui-colla-content .three .layui-form-item{padding-bottom: 0; padding-top: 0px; position: relative;}

		.layui-colla-content .three .layui-form-label .layui-form-checkbox[lay-skin=primary] span{color: #999;}
		.layui-colla-content .three .layui-form-label .layui-form-checkbox[lay-skin=primary]{padding-left: 20px;}

		/*		.layui-colla-content .three .layui-form-item::before{
                    content:'';position:absolute;left:0;line-height:0;margin:0;padding:0;width:21px;height:36px;display:inline-block;
                    vertical-align:middle;border:0 none;cursor:pointer;outline:none;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;
                    background-image:url(../../../public/plugin/zTree/css/metroStyle/img/metro.png);background-position:-84px -12px;}*/
		.layui-colla-content .three .layui-form-item:last-child:before{height: 20px;}
		@media (max-width: 767px){
			/*.layui-colla-content{padding-left: 10px;}*/
			.phone> .layui-input-block{width: 100%; margin-left: 0; float: left; }
			.layui-colla-content .layui-input-block{margin-left: 30px;float: left;}
			.layui-colla-content .three .layui-input-block{margin-left: 50px;}
		}
	</style>
</head>
<body class="childrenBody">
<form class="layui-form layui-col-lg-offset2 layui-col-lg8 layui-col-md-offset1 layui-col-md10" id="addRoleForm">
	<div class="layui-form-item">
		<div class="layui-form-label"><span style="color: red">*</span>角色名称</div>
		<div class="layui-input-block">
			<input type="text" name="roleName" id="roleName" lay-verify="required||TheOnlyName" placeholder="请输入角色名称" autocomplete="off" class="layui-input newsTitle" value="">
		</div>
	</div>
	<div class="layui-form-item">
		<div class="layui-form-label"><span style="color: red">*</span>角色编码</div>
		<div class="layui-input-block">
			<input type="text" name="roleCode" readonly=""  id="roleCode" lay-verify="required||TheOnlyCode" placeholder="请输入角色编码" autocomplete="off" class="layui-input author">
		</div>
	</div>
	<div class="layui-form-item layui-form-text">
		<div class="layui-form-label">角色描述</div>
		<div class="layui-input-block">
			<textarea placeholder="请输入角色描述（选填）" name="description" id="description" class="layui-textarea"></textarea>
		</div>
	</div>
	<div class="layui-form-item phone">
		<div class="layui-form-label">角色权限</div>
		<div class="layui-input-block">
			<div class="layui-collapse" id="context">
				<!--<div class="layui-colla-item on">
					<input type="checkbox" lay-skin="primary" title="原型页面">
					<h2 class="layui-colla-title"></h2>
					<div class="layui-colla-content layui-show">
						<div class="layui-form-item on">
							<div class="layui-form-label">
								<input type="checkbox" lay-skin="primary" title="表格">
							</div>
							<div class="layui-input-block">
								<input type="checkbox" lay-skin="primary" title="普通布局" checked>
								<input type="checkbox" lay-skin="primary" title="分块布局">
								<input type="checkbox" lay-skin="primary" title="基本布局代码解析">
								<input type="checkbox" lay-skin="primary" title="行展开">
								<input type="checkbox" lay-skin="primary" title="侧弹出">
								<input type="checkbox" lay-skin="primary" title="友链(小弹窗)">
								<input type="checkbox" lay-skin="primary" title="布局示例1：入库">
								<input type="checkbox" lay-skin="primary" title="布局示例2：咨询">
								<input type="checkbox" lay-skin="primary" title="布局示例3：用户">
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-form-label">
								<input type="checkbox" lay-skin="primary" title="表单&详情">
							</div>
							<div class="layui-input-block">
								<input type="checkbox" lay-skin="primary" title="表单&详情">
								<input type="checkbox" lay-skin="primary" title="表单示例1：文章">
								<input type="checkbox" lay-skin="primary" title="表单示例2：商品">
								<input type="checkbox" lay-skin="primary" title="拓展表单">
								<input type="checkbox" lay-skin="primary" title="表单验证">
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-form-label">
								<input type="checkbox" lay-skin="primary" title="登录">
							</div>
							<div class="layui-input-block">
								<input type="checkbox" lay-skin="primary" title="团结">
								<input type="checkbox" lay-skin="primary" title="智慧">
								<input type="checkbox" lay-skin="primary" title="炫彩">
								<input type="checkbox" lay-skin="primary" title="亮光">
								<input type="checkbox" lay-skin="primary" title="大数据">
								<input type="checkbox" lay-skin="primary" title="背景切换+第三方验证">
								<input type="checkbox" lay-skin="primary" title="背景">
								<input type="checkbox" lay-skin="primary" title="canvas背景">
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-form-label">
								<input type="checkbox" lay-skin="primary" title="其他">
							</div>
							<div class="layui-input-block">
								<input type="checkbox" lay-skin="primary" title="日程安排FullCalendar">
								<input type="checkbox" lay-skin="primary" title="新版表格">
								<input type="checkbox" lay-skin="primary" title="新版紧凑布局">
								<input type="checkbox" lay-skin="primary" title="流程">
								<input type="checkbox" lay-skin="primary" title="纯表单布局">
								<input type="checkbox" lay-skin="primary" title="图片布局">
								<input type="checkbox" lay-skin="primary" title="layui文档">
								<input type="checkbox" lay-skin="primary" title="图标">
							</div>
						</div>
					</div>
				</div>
				<div class="layui-colla-item">
					<input type="checkbox" lay-skin="primary" title="系统设置">
					<h2 class="layui-colla-title"></h2>
					<div class="layui-colla-content">
						<div class="layui-form-item">
							<div class="layui-form-label">
								<input type="checkbox" lay-skin="primary" title="系统管理">
							</div>
						</div>
						<div class="three">
							<div class="layui-form-item on">
								<div class="layui-form-label">
									<input type="checkbox" lay-skin="primary" title="用户管理">
								</div>
								<div class="layui-input-block">
									<input type="checkbox" lay-skin="primary" title="查看">
									<input type="checkbox" lay-skin="primary" title="新增">
									<input type="checkbox" lay-skin="primary" title="修改">
									<input type="checkbox" lay-skin="primary" title="删除">
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-form-label">
									<input type="checkbox" lay-skin="primary" title="系统日志">
								</div>
								<div class="layui-input-block">
									<input type="checkbox" lay-skin="primary" title="查看">
									<input type="checkbox" lay-skin="primary" title="导出">
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-form-label">
									<input type="checkbox" lay-skin="primary" title="角色管理">
								</div>
								<div class="layui-input-block">
									<input type="checkbox" lay-skin="primary" title="查看">
									<input type="checkbox" lay-skin="primary" title="新增">
									<input type="checkbox" lay-skin="primary" title="修改">
									<input type="checkbox" lay-skin="primary" title="删除">
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-form-label">
									<input type="checkbox" lay-skin="primary" title="菜单管理">
								</div>
								<div class="layui-input-block">
									<input type="checkbox" lay-skin="primary" title="查看">
									<input type="checkbox" lay-skin="primary" title="新增">
									<input type="checkbox" lay-skin="primary" title="修改">
									<input type="checkbox" lay-skin="primary" title="删除">
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-form-label">
									<input type="checkbox" lay-skin="primary" title="资源管理">
								</div>
								<div class="layui-input-block">
									<input type="checkbox" lay-skin="primary" title="查看">
									<input type="checkbox" lay-skin="primary" title="新增">
									<input type="checkbox" lay-skin="primary" title="一键新增">
									<input type="checkbox" lay-skin="primary" title="删除">
								</div>
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-form-label">
								<input type="checkbox" lay-skin="primary" title="组织机构管理">
							</div>
							<div class="layui-input-block">
								<input type="checkbox" lay-skin="primary" title="查看">
								<input type="checkbox" lay-skin="primary" title="新增">
								<input type="checkbox" lay-skin="primary" title="导入">
								<input type="checkbox" lay-skin="primary" title="导出">
								<input type="checkbox" lay-skin="primary" title="修改">
								<input type="checkbox" lay-skin="primary" title="删除">
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-form-label">
								<input type="checkbox" lay-skin="primary" title="流程引擎">
							</div>
						</div>
						<div class="three">
							<div class="layui-form-item">
								<div class="layui-form-label">
									<input type="checkbox" lay-skin="primary" title="流程模型">
								</div>
								<div class="layui-input-block">
									<input type="checkbox" lay-skin="primary" title="查看">
									<input type="checkbox" lay-skin="primary" title="新增">
									<input type="checkbox" lay-skin="primary" title="导出BMPN">
									<input type="checkbox" lay-skin="primary" title="部署">
									<input type="checkbox" lay-skin="primary" title="修改">
									<input type="checkbox" lay-skin="primary" title="删除">
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-form-label">
									<input type="checkbox" lay-skin="primary" title="流程实例">
								</div>
								<div class="layui-input-block">
									<input type="checkbox" lay-skin="primary" title="查看">
									<input type="checkbox" lay-skin="primary" title="部署流程">
									<input type="checkbox" lay-skin="primary" title="转为Model">
									<input type="checkbox" lay-skin="primary" title="删除">
								</div>
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-form-label">
								<input type="checkbox" lay-skin="primary" title="备份管理">
							</div>
						</div>
						<div class="three">
							<div class="layui-form-item">
								<div class="layui-form-label">
									<input type="checkbox" lay-skin="primary" title="数据备份">
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-form-label">
									<input type="checkbox" lay-skin="primary" title="备份历史">
								</div>
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-form-label">
								<input type="checkbox" lay-skin="primary" title="系统接口配置">
							</div>
							<div class="layui-input-block">
								<input type="checkbox" lay-skin="primary" title="查看">
								<input type="checkbox" lay-skin="primary" title="新增">
								<input type="checkbox" lay-skin="primary" title="修改">
								<input type="checkbox" lay-skin="primary" title="删除">
							</div>
						</div>
					</div>
				</div>-->
				{{each menuList}}
				<div class="layui-colla-item">
					<input type="checkbox" lay-filter="menuNameList"  value="{{$value.id}}" lay-skin="primary" title="{{$value.menuName}}">
					<h2 class="layui-colla-title"></h2>
					<div class="layui-colla-content ">
						{{each $value.children as childrenObj index}}
						<div class="layui-form-item twoMenu">
							<div class="layui-form-label">
								{{if childrenObj.sysMetadataList.length == 0}}
								<input type="checkbox" lay-skin="primary" lay-filter="twoMenu" value="{{childrenObj.id}}" title="{{childrenObj.menuName}}">
								{{else}}
								<input type="checkbox" lay-skin="primary" lay-filter="twoMenu"  title="{{childrenObj.menuName}}">
								{{/if}}
							</div>
							{{if childrenObj.children.length == 0}}
							<div class="layui-input-block">
								{{each childrenObj.sysMetadataList as sysMetadataObj index}}
									{{if index == 0 }}
									<input type="checkbox" lay-skin="primary" lay-filter="metadata" value="{{childrenObj.id}}"  title="查询">
									{{/if}}
									<input type="checkbox" lay-skin="primary" lay-filter="metadata" value="{{childrenObj.id}}-{{sysMetadataObj.id}}"  title="{{sysMetadataObj.metadataName}}">
								{{/each}}
							</div>
							{{/if}}
						</div>
						<div class="three">
							{{each childrenObj.children as threeChildren index}}
							<div class="layui-form-item threeMenu">
								<div class="layui-form-label">
									{{if threeChildren.sysMetadataList.length == 0 }}
									<input type="checkbox" lay-skin="primary" lay-filter="threeMenu" value="{{threeChildren.id}}"  title="{{threeChildren.menuName}}">
									{{else}}
									<input type="checkbox" lay-skin="primary" lay-filter="threeMenu" title="{{threeChildren.menuName}}">
									{{/if}}
								</div>
								<div class="layui-input-block">
									{{each threeChildren.sysMetadataList as sysMetadata index}}
										{{if index == 0}}
										<input type="checkbox" lay-filter="metadata" value="{{threeChildren.id}}" lay-skin="primary" title="查询">
										{{/if}}
										<input type="checkbox" lay-filter="metadata" value="{{threeChildren.id}}-{{sysMetadata.id}}" lay-skin="primary" title="{{sysMetadata.metadataName}}">
									{{/each}}
								</div>
							</div>
							{{/each}}
						</div>
						{{/each}}
					</div>
				</div>
				{{/each}}
			</div>
		</div>
	</div>
	<div class="layui-form-item">
		<div class="layui-input-block">
			<a class="layui-btn" lay-filter="addRole" lay-submit="">立即提交</a>
			<a class="layui-btn layui-btn-primary" onclick="layuiFunciton.closeOpen();">返回</a>
		</div>
	</div>
</form>
</body>
<script type="text/javascript" src="/public/js/jquery.min.js"></script>
<script type="text/javascript" src="/public/layui/layui.js"></script>
<script type="text/javascript"  src="/js/public.function.js"></script>
<script type="text/javascript"  src="js/add.js"></script>
</html>